package com.beta.entity;

import com.baomidou.mybatisplus.annotations.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 *
 * 
 *
 */
public class Assets implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**  */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**  */
	private Integer viewableId;

	/**  */
	private String viewableType;

	/**  */
	private Integer width;

	/**  */
	private Integer height;

	/**  */
	private Integer position;

	/**  */
	private String attachment;

	/**  */
	private String type;

	/**  */
	private String alt;

	/**  */
	private Date createdAt;

	/**  */
	private Date updatedAt;


	public Integer getId() {
		return this.id;
	}

	public Assets setId(Integer id) {
		this.id = id;
		return this;
	}

	public Integer getViewableId() {
		return this.viewableId;
	}

	public Assets setViewableId(Integer viewableId) {
		this.viewableId = viewableId;
		return this;
	}

	public String getViewableType() {
		return this.viewableType;
	}

	public Assets setViewableType(String viewableType) {
		this.viewableType = viewableType;
		return this;
	}

	public Integer getWidth() {
		return this.width;
	}

	public Assets setWidth(Integer width) {
		this.width = width;
		return this;
	}

	public Integer getHeight() {
		return this.height;
	}

	public Assets setHeight(Integer height) {
		this.height = height;
		return this;
	}

	public Integer getPosition() {
		return this.position;
	}

	public Assets setPosition(Integer position) {
		this.position = position;
		return this;
	}

	public String getAttachment() {
		return this.attachment;
	}

	public Assets setAttachment(String attachment) {
		this.attachment = attachment;
		return this;
	}

	public String getType() {
		return this.type;
	}

	public Assets setType(String type) {
		this.type = type;
		return this;
	}

	public String getAlt() {
		return this.alt;
	}

	public Assets setAlt(String alt) {
		this.alt = alt;
		return this;
	}

	public Date getCreatedAt() {
		return this.createdAt;
	}

	public Assets setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
		return this;
	}

	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public Assets setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
		return this;
	}

	public String getAttachmentUrl() {
		return String.join("/", "image", "attachment", Objects.toString(getId()), getAttachment());
	}

}
